package com.ydj.framework.utils.generator;

import lombok.Getter;
import lombok.experimental.Accessors;

import java.io.File;

@Getter
@Accessors(chain = true)
class GeneratorOutputInfo {
    File file;
    String javaCode;

    public GeneratorOutputInfo(File outputDir, String preDir, String className, String javaCode) {
        File dir = outputDir;
        if (preDir != null) {
            dir = new File(outputDir, preDir);
        }
        this.file = new File(dir, className + ".java");
        this.javaCode = javaCode;
    }
}
